package com.naiterui.ehp.bs.im.network.protocl;

import java.io.Serializable;

import org.apache.commons.lang3.StringUtils;

import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;

/**
 * 随访填写通知
 * 
 * @author yangfuya
 * @version 1.0
 * @date 2021/5/25 18:27
 **/
@Slf4j
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FollowUpFillin implements IChecker, Serializable {

    private static final long serialVersionUID = -5559626233416949364L;
    /**
     * 随访Id
     */
    private Long followUpId;
    /**
     * 随访表单Id
     */
    private Long followUpRecordFormId;
    /**
     * 内容
     */
    private String content;

    @Override
    public boolean selfValidate() {
        if (ObjectUtil.isNull(followUpId) || ObjectUtil.isNull(followUpRecordFormId) || StringUtils.isEmpty(content)) {
            log.error("media message has no available path!");
            return false;
        }
        return true;
    }
}
